import request from '@/utils/request'
// 货取所有权限点
export const getpermission = () => {
  return request({
    url: '/sys/permission'
  })
}
// 添加权限点
export const Addpermission = (data) => {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
// 根据id 获取权重点详情
export const getPermissionDetail = (id) => {
  return request({
    url: `/sys/permission/${id}`

  })
}

// 根据id更新权限
export const updatePermission = (data) => {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data

  })
}

// 根据id 删除权限点
export const delPermission = (id) => {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete'

  })
}
